A value of type MPSemaphoreCount
that specifies the maximum allowed value of the semaphore.
initialValue
A value of type MPSemaphoreCount
that specifies the initial value of the semaphore.
semaphore
A pointer to a variable of type MPSemaphoreID
. On return, the variable contains the ID of the newly-created semaphore.
function result
A result code. See
Result Codes
for a list of possible values.
DISCUSSION
If you want to create a binary semaphore, you can call the macro MPCreateBinarySemaphore (MPSemaphoreID *semaphore)
instead, which simply calls MPCreateSemaphore
with both maximumValue
and initialValue
set to 1.